package com.dianxin.smartpark.service.aclAppInfo.impl;

import com.chinatelecom.response.common.CommonResponseBody;
import com.dianxin.acl.api.aclApplInfo.AclAppInfoRpcService;
import com.dianxin.acl.api.dto.AclAppInfoDTO;
import com.dianxin.smartpark.service.aclAppInfo.AclAppInfoService;
import com.dianxin.smartpark.service.config.AclAppInfoConfig;
import com.dianxin.sso.client.context.UserHolderContext;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Authort Ricartc
 */

@Service
public class AclAppInfoServiceImpl implements AclAppInfoService {
    @Resource
    AclAppInfoRpcService aclAppInfoRpcService;
    @Resource
    AclAppInfoConfig aclAppInfoConfig;

    @Override
    public CommonResponseBody<AclAppInfoDTO> getAppInfo() {
        String tenantId = UserHolderContext.getUser().getTenantId();
        String appId = aclAppInfoConfig.getId();
        return aclAppInfoRpcService.getAppInfo(tenantId,appId);
    }
}
